package org.jeecg.util;

public class ProtocolConstants {
    // AP:C层协议常量
    public static final byte AP_START_END_FLAG = 0x7E;
    public static final byte AP_PROTOCOL_TYPE = 0x03;
    public static final byte VP_PROTOCOL_TYPE = 0x01;

    // VP:A层协议常量
    public static final int VP_ADDRESS_LENGTH = 5; // 站点编号4字节 + 设备编号1字节

    // MCP:A层命令标识
    public static final byte CMD_QUERY = 0x02;
    public static final byte CMD_SET = 0x03;
    public static final byte CMD_ALARM_REPORT = 0x01;

    // 监控数据标识范围
    public static final int DEVICE_INFO_START = 0x0000;
    public static final int DEVICE_INFO_END = 0x00FF;
    public static final int ALARM_ENABLE_START = 0x0200;
    public static final int ALARM_ENABLE_END = 0x02FF;
    public static final int ALARM_STATUS_START = 0x0300;
    public static final int ALARM_STATUS_END = 0x03FF;
    public static final int REAL_TIME_DATA_START = 0x0500;
    public static final int REAL_TIME_DATA_END = 0x05FF;

    // 特定监控数据标识
    public static final int DEVICE_INFO_LIST = 0x0009;
    public static final int REPORT_TYPE = 0x0141;
}